import { getDashboardInfoApi } from '@/api/dashboard/dashboardApi';

const actions = {
  /*用于基础信息查询的action*/
  async fetchDashboardInfoAction(context) {
    const { data } = await getDashboardInfoApi();
    context.commit('saveDashboardInfoMutation', data);
  },
};
const mutations = {
  /*用于保存基础信息查询的mutation*/
  saveDashboardInfoMutation(state, info) {
    state.info = info;
  },
};
const state = () => {
  return {
    info: {},
  };
};

export default {
  actions,
  mutations,
  state,
  namespaced: true,
};
